<template>
  <div class="mine">
	<van-nav-bar title="我的" style="background-color: #42B983;"></van-nav-bar>
    <div class="content">
		<div class="title menu-title">
			<img src="../assets/timg.jpg" alt="">
			<van-cell center title="昵称:Taurus" is-link label="账号:835" />
		</div>
		<div class="menu">
			<div class="menu-item">
				<van-cell icon="edit" title="修改密码" is-link @click="modifypwd"/>
				<van-cell icon="setting-o" title="设置" is-link @click="setting"/>
			</div>
			<van-button type="primary" class="btn" @click="logout">退出登录</van-button>
		</div>
	</div>
  </div>
</template>
<script>
import { Toast,Dialog } from 'vant';
export default{
	methods:{
		modifypwd(){
			this.$router.push("/modifypwd")
		},
		setting(){
			this.$router.push("/settings")
		},
		logout(){
			Dialog.confirm({
			  title: '退出登录',
			  message: '确认退出登录吗？',
			})
			.then(() => {
			   this.$router.push("/login")
			})
			.catch(() => {
			});
			
		}
	}
}
</script>
<style scoped="scoped">
.menu-item{
	padding: 5px 0;
	margin-top: 20px;
}
.menu-title{
	display: flex;
	background-color: #FFFFFF;
}
.menu-title img{
	width: 60px;
	height: 60px;
	padding: 6px 6px;
}
.btn{
	display: block;
	width: 80%;
	margin-left: 10%;
	margin-right: 5%;
	margin-top: 30px;
	text-align: center;
}
</style>